<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>计算收入</title>
    <link rel="stylesheet" href="./build/css/input.css">
    <script src="./libs/jquery/jquery-1.8.3.min.js"></script>
    <script src="./libs/vue/vuedev.js"></script>
    <script type="text/javascript" src="./libs/echarts.min.js"></script>
    <script type="text/javascript" src="./libs/echarts-gl.min.js"></script>
</head>
<body>
     <div class="wrap">
         <div class="title">
             <div>计算结果</div>
             <div class="close"   @click="close">x</div>
         </div>
         <div class="main">
             <div class="content">
                 根据计算，你现在 
                 <span class="mark">
                     {{initData.typeName}}{{initData.investmentAmount}}元</span> 
                 到
                 <span class="mark">{{initData.rate}}%</span> 
                 年化收益率的产品上，可在 
                 <span class="mark"  v-if="initData.type!=1">{{initData.term}}年</span> 
                 <span class="mark"  v-if="initData.type==1">{{initData.term*12}}个月</span> 
                 后获得 
                 <span class="mark">{{initData.income}}元</span> 
                 的收入。
                 <div  v-if="initData.type!=0">
                    其中，
                    <span v-if="initData.type==2">{{initData.term}}年</span> 
                    <span v-if="initData.type==1">{{initData.term*12}}个月</span>
                    的总投入为<span class="mark">{{initData.totalInvestment}}元</span>
                </div>
             </div>
             <div>
                <div id="pieCon" class="pie"   ></div>
             </div>
         </div>

     </div>
      
     <script src="./build/js/input.js"></script>
     <script src="./libs/main.js"></script>
     <script>
            var appdata={
                    term:9, //期限 单位年
                    income:76576.89,//总收入 单位 元
                    investmentAmount:60000, // 投资金额 ，定投金额，根据type 字段判断获取
                    rate:5,// 年化收益率 单位%
                    type:0 ,// 类型 0 一次性投入  1月定投 2 年定投
                    totalInvestment:'3000',//总投入金额
                }
                vm.appgetdata( JSON.stringify(appdata) )
        </script>
</body>
</html>